From: Giovanni Campagna Date: Tue, 8 Oct 2013 19:24:30 +0000 (+0200) Subject: NetworkMenu: hide the "Turn On" item when the rfkill is hardware blocked X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3268 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a6fb3acb42edb588eba40a65c8fd90062b15c8f8;p=gnome-shell.git NetworkMenu: hide the "Turn On" item when the rfkill is hardware blocked If wifi is disabled in hardware, there is nothing we can do at the sw level, so hide the menu item. https://bugzilla.gnome.org/show_bug.cgi?id=709635 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 26aa81616..598b5bb5d 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1058,6 +1058,7 @@ const NMDeviceWireless = new Lang.Class({ _sync: function() { this._toggleItem.label.text = this._client.wireless_enabled ? _("Turn Off") : _("Turn On"); + this._toggleItem.actor.visible = this._client.wireless_hardware_enabled; this.item.status.text = this._getStatus(); this.item.icon.icon_name = this._getMenuIcon();